/**
 *
 *
 * 
 *
 * 
 */

package io.dbw.modules.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.dbw.common.enums.Excel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 系统用户
 *
 * 
 */
@Data
@TableName("sys_user")
@Api(tags = "用户实体类")
public class SysUserEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 用户ID
	 */
	@TableId
	@ApiModelProperty(value = "用户ID",required = true)
	private Long userId;
	/**
	 * 用户名
	 */
	@NotBlank(message="用户名不能为空")
	@ApiModelProperty(value = "用户名",required = true)
	@Excel(name = "用户名")
	private String userName;


//    @NotBlank(message="姓名不能为空")
    @ApiModelProperty(value = "姓名",required = true)
	@Excel(name = "姓名")
    private String name;


	/**
	 * 密码
	 */
//	@NotBlank(message="密码不能为空")
	@ApiModelProperty(value = "密码",required = true)
	private String password;


	/**
	 * 邮箱
	 */
	@ApiModelProperty(value = "邮箱")
	private String email;

	/**
	 * 手机号
	 */
//	@NotBlank(message="手机号不能为空" )
	@ApiModelProperty(value = "手机号",required = true)
	private String mobile;



	/**
	 * 状态  0：禁用   1：正常
	 */
	@ApiModelProperty(value = "状态;0:禁用,1:正常",required = true)
	private Integer status;


	/**
	 * 角色ID列表
	 */
	@TableField(exist=false)
	@ApiModelProperty(value = "角色ID列表集合",required = true)
//	@NotEmpty(message = "角色不能为空")
	private List<Long> roleIdList;

	/**
	 * 创建者ID
	 */
	@ApiModelProperty(value = "创建者ID",hidden = true)
	private Long createBy;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private Date createTime;


	@ApiModelProperty(value = "判断权限是否改动",hidden = true)
	@TableField(exist = false)
	private Boolean roleEditFlag;

	/**
	 * 是否删除:Y:是;N:否
	 */
	@ApiModelProperty(value = "是否删除:Y:是;N:否")
	@TableLogic
	private String deleteFlag;


	@ApiModelProperty(value = "是否为管理员:Y:是,N:否")
	private String managerFlag;

	@ApiModelProperty(value = "性别:1:男,0:女")
	private String sex;

	@ApiModelProperty(value = "班级名称")
	private String className;


}
